package com.yunhe.merchants.model;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @ClassName: BaseStatistics
 * @Description:
 * @author: GongDaCheng
 * @Date: 9:41 2021/5/12
 */
public class BaseStatistics implements Serializable {
    private static final long serialVersionUID = 502456915568530155L;

    @ApiModelProperty(value = "当前指标")
    private Double currentTarget = 0.0D;
    @ApiModelProperty(value = "当前完成量")
    private Double currentComplete = 0.0D;
    @ApiModelProperty(value = "当前完成比例")
    private Double currentRate = 0.0D;
    @ApiModelProperty(value = "同比变化量")
    private Double yearChange = 0.0D;

    public Double getCurrentTarget() {
        return currentTarget;
    }

    public void setCurrentTarget(Double currentTarget) {
        this.currentTarget = currentTarget;
    }

    public Double getCurrentComplete() {
        return currentComplete;
    }

    public void setCurrentComplete(Double currentComplete) {
        this.currentComplete = currentComplete;
    }

    public Double getCurrentRate() {
        return currentRate;
    }

    public void setCurrentRate(Double currentRate) {
        BigDecimal b = new BigDecimal(currentRate);
        this.currentRate = b.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
    }

    public Double getYearChange() {
        return yearChange;
    }

    public void setYearChange(Double yearChange) {
        BigDecimal b = new BigDecimal(yearChange);
        this.yearChange = b.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
    }
}
